class Solution {
public:
    vector<int> corpFlightBookings(vector<vector<int>>& bookings, int n) {
        vector<int> book(n+2,0);
        int cnt=bookings.size();
        for(int i=0;i<cnt;i++){
            book[bookings[i][0]]+=bookings[i][2];
            book[bookings[i][1]+1]-=bookings[i][2];
        }
        for(int i=1;i<=n;i++){
            book[i]+=book[i-1];
        }
        vector<int> ans(book.begin()+1,book.end()-1);
        return ans;
    }
};